import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import HomeView from '../views/HomeView.vue'


const routes: Array<RouteRecordRaw> = [
  // {
  //   path: '/homee',
  //   name: 'home',
  //   component: HomeView
  // },
  // {
  //   path: '/about',
  //   name: 'about',
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // },
  {
    path: '/zhu',
    name: 'zhu',
    component: () => import(/* webpackChunkName: "about" */ '../components/Zhu.vue'),
  },
  {
    path: '/',
    name: 'login',
    component: () => import(/* webpackChunkName: "about" */ '../views/Login.vue',),
  },
  {
    path: '/register',
    name: 'register',
    component: () => import(/* webpackChunkName: "about" */ '../views/Register.vue',),
  },
  {
    path: '/sy',
    name: 'demo',
    component: () => import(/* webpackChunkName: "demo" */ '../views/demo.vue'),
    redirect: "/sy",
    children: [
      {path: '/sy', name: 'sy', component: () => import('../views/sy.vue')},
      {path: '/home', name: 'home', component: () => import('../views/Home.vue')},
      {path: '/count', name: 'count', component: () => import('../views/CountTime.vue')},
      {path: '/focus', name: 'focus', component: () => import('../views/Focus.vue')},
      {path: '/arrange', name: 'arrange', component: () => import('../views/Arrange.vue')},
    ]

  },
  {
    path: '/person',
    name: 'person',
    component: () => import(/* webpackChunkName: "about" */ '../views/Person.vue',),
  },
  // {
  //   path: '/count',
  //   name: 'count',
  //   component: () => import(/* webpackChunkName: "about" */ '../views/CountTime.vue')
  // },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
